package ctrip.api.flight.trade.common.commondata.v1;

import ctrip.api.flight.trade.common.basetype.v1.MessageHeadType;

import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;


@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FdPolicySearchRequestType", propOrder = {
    "messageHead",
    "messageBody"
})
@XmlRootElement(name = "FdPolicySearchRequest")
public class FdPolicySearchRequestType {

    @XmlElement(name = "MessageHead", required = true)
    protected MessageHeadType messageHead;
    @XmlElement(name = "MessageBody", required = true)
    protected FdPolicySearchRequestType.MessageBody messageBody;

    public MessageHeadType getMessageHead() {
        return messageHead;
    }

    public void setMessageHead(MessageHeadType value) {
        this.messageHead = value;
    }

    public FdPolicySearchRequestType.MessageBody getMessageBody() {
        return messageBody;
    }

    public void setMessageBody(FdPolicySearchRequestType.MessageBody value) {
        this.messageBody = value;
    }


    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "departEffectDate",
        "departExpiryDate",
        "flightWay",
        "carrier",
        "subClass",
        "cabinClass",
            "dCityACityList"
    })
    public static class MessageBody {

        @XmlElement(name = "DepartEffectDate")
        private String departEffectDate;

        @XmlElement(name = "DepartExpiryDate")
        private String departExpiryDate;

        @XmlElement(name = "FlightWay")
        protected String flightWay;

        @XmlElement(name = "Airline")
        protected String carrier;

        @XmlElement(name = "SubClass")
        protected String subClass;

        @XmlElement(name = "Class")
        protected String cabinClass;



        @XmlElement(name = "DCityACityList")
        private FdPolicySearchRequestType.MessageBody.DCityACityList dCityACityList;

        public String getCabinClass() {
            return cabinClass;
        }

        public void setCabinClass(String cabinClass) {
            this.cabinClass = cabinClass;
        }

        public String getDepartEffectDate() {
            return departEffectDate;
        }

        public void setDepartEffectDate(String departEffectDate) {
            this.departEffectDate = departEffectDate;
        }

        public String getDepartExpiryDate() {
            return departExpiryDate;
        }

        public void setDepartExpiryDate(String departExpiryDate) {
            this.departExpiryDate = departExpiryDate;
        }

        public DCityACityList getdCityACityList() {
            if (dCityACityList == null) dCityACityList = new DCityACityList();
            return dCityACityList;
        }

        public void setdCityACityList(DCityACityList dCityACityList) {
            this.dCityACityList = dCityACityList;
        }


        @XmlAccessorType(XmlAccessType.FIELD)
        @XmlType(name = "", propOrder = {
            "dCityACityTypes"
        })
        public static class DCityACityList {

            @XmlElement(name = "DCityACity", required = true)
            protected List<DCityACityType> dCityACityTypes;

            public List<DCityACityType> getDCityACityTypes() {
                if (dCityACityTypes == null) {
                    dCityACityTypes = new ArrayList<>();
                }
                return this.dCityACityTypes;
            }

        }

    }

}
